const { http } = uni.$u

export const appInit = (params, config = {}) => http.post('index/index', params, config);
export const getPhoneNumber = (params, config = {}) => http.post('user/getPhoneNumber', params, config);
export const wxlogin = (params, config = {}) => http.post('user/wx_login', params, config);
export const login = (params, config = {}) => http.post('user/checkIn', params, config);
export const get_banner = (params, config = {}) => http.post('index/ads', params, config);

export const get_config = (params, config = {}) => http.post('index/get_config', params, config);

export const productCategory = (params, config = {}) => http.post('product/categorys', params, config);
export const productCases = (params, config = {}) => http.post('product/cases', params, config);

export const subOrder = (params, config = {}) => http.post('order/checkout', params, config);

export const articleDetails = (params, config = {}) => http.post('index/article', params, config);

export const getUserInfo = (params, config = {}) => http.post('account/index', params, config);
export const getUserOverview = (params, config = {}) => http.post('account/overview', params, config);
export const updateProfile = (params, config = {}) => http.post('account/profile', params, config);
export const getOrderLists = (params, config = {}) => http.post('account/orders', params, config);
export const getOrderDetail = (params, config = {}) => http.post('account/orderDetail', params, config);
export const orderHandler = (params, config = {}) => http.post('account/orderHandler', params, config);

